# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=shortfuzzy
pkgver=0.1
pkgrel=9
groups=('blackarch' 'blackarch-webapp' 'blackarch-fuzzer' 'blackarch-scanner')
pkgdesc='A web fuzzing script written in perl.'
arch=('any')
url='http://packetstormsecurity.com/files/104872/Short-Fuzzy-Rat-Scanner.html'
license=('custom:unknown')
depends=('perl' 'perl-libwww' 'perl-http-message')
source=("https://dl.packetstormsecurity.net/UNIX/scanners/$pkgname.tgz")
sha512sums=('0cf9c55d3c833914eebe03b57e9cda973aae1958a1b47c4d64c87e28433cb9013e0857f6ecc8f82255485d9a342fc4b42aa8737288b16040c200c001e8528719')

package() {
  install -dm 755 "$pkgdir/usr/bin"

  rm "$pkgname.tgz"

  install -Dm 644 -t "$pkgdir/usr/share/$pkgname/" *

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
exec perl /usr/share/$pkgname/short.fuzzy.rat.pl "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

